/**
 * 
 */
package rs.fon.rapidminer.operator.learner.tree;

import java.util.List;

import com.rapidminer.example.ExampleSet;
import java.util.Date;
import rs.fon.rapidminer.process.annotation.Parameter;

/**
 * @author Nikola
 * 
 */
public class TimeStoppingCriteria extends AbstractStopingCriteria {
	@Parameter(defaultValue = "60", maxValue = "600", minValue = "1")
	private Double Seconds;

	

	@Override
	public Object DoWork(ExampleSet exampleSet, int depth, Date startDate, List<rs.fon.rapidminer.process.Parameter> parameters)
	{
		Date currentDate = new Date();
		long diff = currentDate.getTime() - startDate.getTime();
		System.out.print("345");
		return (( diff/(1000) < Integer.parseInt(parameters.get(0).getXenteredValue()))) ;
	}
	
}

